---
id: 6566195b0a021bb660b2b4b1
title: Step 16
challengeType: 20
dashedName: step-16
---

# --description--

Now modify `my_graph["B"]` into a list of tuples. The `B-C` distance is `4`.

# --hints--

`my_graph["B"]` should be a list of tuples.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    type(graph["B"]) is list and all(type(i) is tuple for i in graph["B"])
  `))
})
```

`my_graph["B"]` should be a list of tuples where the first item in the tuple is the connected node and the second item is the distance.

```js
({ test: () => assert(__pyodide.runPython(`
    graph = __locals.get("my_graph")
    tuples = [("A", 3), ("C", 4)]
    len(graph["B"]) == 2 and all(t in graph["B"] for t in tuples)
  `))
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
my_graph = {
    'A': [('B', 3), ('D', 1)],
    'B': ['A', 'C'],
--fcc-editable-region--    
    'C': ['B', 'D'],
    'D': ['A', 'C']
}

```
